package com.jvm.shk;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Random;

/**
 * @author ：qs
 * @date ：Created in 2022/9/26
 * @description：
 * @modified By：
 */
public class HeapInstanceTest {

    byte[] buffer = new byte[new Random().nextInt(1024*100)];

    public static void main(String[] args) {
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        ArrayList<HeapInstanceTest> list = new ArrayList<>();
        int i = 0;
        while (true) {
            list.add(new HeapInstanceTest());

            i++;
            try {
                System.out.println("第" + i + "次, " + LocalDateTime.now());
                Thread.sleep(10);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
